
package com.xxl.job.core.commons.annotation;


import com.xxl.job.core.commons.annotation.impl.NameSpaceCheckImpl;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * description : 自定义名字注解空格验证类
 *
 * @author : tanxingsong
 * @date : 13:33 2019/2/21
 * @email : tanxingsong@cetcbigdata.com
 */
@Constraint(validatedBy = NameSpaceCheckImpl.class)
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
@Retention(RUNTIME)
public @interface NameSpaceCheck {

    String message() default "字符串首尾不应该包含空格";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
